import {
  createStore,
  combineReducers,
  applyMiddleware
} from "redux"
import reducers from "./reducers"
// 使用了 redux-thunk 解决异步代码问题
import thunk from "redux-thunk"
// 使用 chrome dedux-devtools
const store = createStore(
  combineReducers(reducers), {
    from: "齐齐哈尔",
    to: "乌鲁木齐",
    isCitySelectorVisible: false,
    isDateSelectorVisible: false,
    currentSelectingLeftCity: false,
    cityData: null,
    isLoadingCityData: false,
    highSpeed: false,
    departDate: Date.now(),
  },
  applyMiddleware(thunk)
)

export default store